<?php
	include(ROOTPATH .'include'. DS .'protect.php');
	include(ROOTPATH .'include'. DS .'initUser.php');
	$title = lang_assess .' ('. $invite .')' ;
	include "header.php";
?>
<script type="text/javascript" src="<?php echo JS_PATH;?>taskAssess.js"></script>
</head>
<body>

<?php require('top.php'); ?>
<div class="pos">	
    <div class="contents">
    	<?php
			if( $user -> id() != 0 )
				require('nav.php');
		?>   
        <h2 class="title"><?php echo $navigation -> getList();?> <?php echo lang_assess_works_assess ;?></h2>
        <div id="taskAssess" class="taskAssess">
        	<ul class="box">
            	<?php
                    if($isAdmin)
						 echo $taskAssess -> getList($task_id,$invite , $timeEnd , $selectionArea ,'score',$orderByType,true,false);
					else{
						if(!$isHasTask ){
							echo '<br /><br /><div class="error">'.lang_assess_works_is_not_exist.'.</div>';
						}else{
							if(!$isCanAssess){// 不信任加密网址链接，查询数据库再次验证.
								echo '<div class="error">'.lang_assess_no_purview.'.</div>'; 
							}else{
								if( (int)date('Ymd',time()) > (int)date('Ymd',strtotime($timeEnd))  ){// 验证时间
									echo '<div class="error">'.lang_assess_timeout.'.</div>';
								}
								?>
	<h3>尊敬的评阅人(<strong><?php echo $invite ;?></strong>) , 邀请您对下列作品进行打分，<br />感谢您在百忙中抽出宝贵的时间。</h3>
	<h4>注意：本页面将在 <strong><?php echo $timeEnd; ?></strong> 过期，过期后您只能查看. (无法通过本页面继续打分或修改之前的打分)。</h4>
    <hr />
    <h2><a href="<?php echo WEB_ROOT_PATH;?>?option=task&id=<?php echo $task_id;?>"><?php echo $show['name'];?></a></h2>
	<?php
		echo $taskAssess -> getList($task_id,$invite , $timeEnd , $selectionArea ,'score',$orderByType,true,false);
	?>
								<?php
							}
						}
					}
                ?>
            </ul>&nbsp;
        </div><!-- #taskAssess -->
        <div class="highOther">
        	<form action="./" method="get" class="form">
                <input name="option" type="hidden" value="taskAssess" />
                <input name="query" type="hidden" value="<?php echo $queryCode; ?>" />                
            	<select name="orderByType" class="select">
            	  <option value="DESC" <?php if($orderByType == 'DESC') echo ' selected="selected"';?>><?php echo lang_high_low;?></option>
            	  <option value="ASC" <?php if($orderByType == 'ASC') echo ' selected="selected"';?>><?php echo lang_low_high;?></option>
            	</select>
                <input type="submit" value="<?php echo lang_sort;?>" class="submit" />            
            </form>
        </div>
    </div><!-- .contents-->
</div>

</body>
</html>
